import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import tagsView from './modules/tagsView'
import getters from './getters'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    is404: false,
  },
  mutations: {
    NOT_FOUND(state, notFound = true) {
      state.is404 = notFound
    },
  },
  modules: {
    app,
    user,
    tagsView,
  },
  getters,
})

export default store
